<template>
    <div>
        <div class="box">
            <img :src="img[0]" alt="">
        </div>
    </div>
</template>

<script>
import service from '@/utils/service';
export default {
    data(){
        return {
            img:[]
        }
    },
    mounted(){
        service({
            url:"http://localhost:3000/Valentine",
            method:'get'
        }).then((res)=>{
           res.data.forEach(element => {
                this.img.push(element.pic)
           });
        })
    }
}
</script>

<style scoped>
.box {
    height: 133.5px;
    margin: auto;
}
.box img {
    width: 100%;
}
</style>